
//import java.util.*;


import java.util.Scanner;

public class Test {
//    public static main(String [], ages){
//        Scanner scan=new Scanner.(System.in);
//        int n=scan.nextInt();
//        int count=NumberOf1 (n);
//        System.out.println(count);
//    }
    public static int NumberOf1 (int n) {
        int count=0;
        for(int i=31;i>=0;i--){
            if((n&1)==1){
                count++;
            }
            n=n>>>1;
        }
        return count;
    }

    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        int count=NumberOf1 (n);
       System.out.println(count);

    }
}